# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: inkyu

from coin.strategy.cheese.pricer.sidecar.l1 import SidecarL1Pricer


class PricerBuilder(object):
  def __init__(self, config):
    self._master_config = config['master']
    self._specific_config = config['specific']

    classes = {
        'sidecar': SidecarL1Pricer,
    }
    self._pricer_class = classes[self._master_config['main_pricer']]

  def build(self, l1_config, strategy_logger):
    return self._pricer_class(specific_config=self._specific_config,
                              l1_config=l1_config,
                              strategy_logger=strategy_logger)
